create_stream rustdoc Errors omits InvalidRate#953
Open
akprinciple wants to merge 1 commit into
Open
Conversation
Contributor
|
heads up: main's ci was broken (the Backend CI and Backend Docker Image CI jobs) until the fixes in #969 and #974 just landed, so the red backend/docker checks on this pr are almost certainly stale, they ran against the broken main. please rebase to re-test against the now-green main: |
2429fdf to
894cff7
Compare
Author
|
@ogazboiz Kindly check now boss |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs: Add InvalidRate to create_stream # Errors list
closes #797
This PR addresses a documentation inconsistency in the
create_streamfunction. The function can returnStreamError::InvalidRatewhen the calculated rate per second truncates to zero, but this error was missing from the function's doc comment in the# Errorssection.This change updates the documentation to include
InvalidRate, ensuring that developers are aware of all possible error conditions when using the function.Why this matters
The
# Errorssection forcreate_streamwas out of sync with the implementation. It was missing theInvalidRateerror, which can occur whennet_amount / durationtruncates to 0. Accurate documentation is crucial for contract usability and helps prevent integration errors.Acceptance Criteria
InvalidRateerror is added to the# Errorslist in thecreate_streamfunction's doc comment incontracts/stream_contract/src/lib.rs.Out of Scope
# Errorssections for any other functions.